onEvent('recipes', event => {
	//阶段锭制造
	// event.recipes.custommachinery.custom_machine("custommachinery:assembly_magic_machine", 400)
	// 	.requireItem('16x evilcraft:hardened_blood_shard', 'input1')
	// 	.requireItem('4x evilcraft:dark_power_gem', 'input2')
	// 	.requireItem('4x tconstruct:scorched_brick', 'input3')
	// 	.requireItem('8x astralsorcery:black_marble_raw', 'input4')
	// 	.requireFluid(Fluid.of('astralsorcery:liquid_starlight', 2000), 'input8')
	// 	.produceItem('kubejs:party_1_ingot')
	// 	.requireStructure(
	// 		[
	// 			[
	// 				"aba",
	// 				"bcb",
	// 				"aba",
	// 				" m "
	// 			],
	// 			[
	// 				"ddd",
	// 				"ded",
	// 				"ddd",
	// 				"   "
	// 			],
	// 			[
	// 				"ddd",
	// 				"ded",
	// 				"ddd",
	// 				"   "
	// 			],
	// 			[
	// 				"aba",
	// 				"bcb",
	// 				"aba",
	// 				"   "
	// 			]
	// 		],
	// 		{
	// 			"a": 'astralsorcery:marble_chiseled',
	// 			"b": 'astralsorcery:marble_arch',
	// 			"c": 'astralsorcery:black_marble_raw',
	// 			"d": 'minecraft:iron_bars',
	// 			"e": 'astralsorcery:marble_pillar'
	// 		});

	//生物笼
	event.recipes.custommachinery.custom_machine("custommachinery:calling_altar", 400)
		.requireItem('kubejs:summon_blaze')
		.requireFluidTag("#minecraft:lava", 5000)
		.runCommandOnEnd("/summon minecraft:blaze ~ ~1 ~", false);

	event.recipes.custommachinery.custom_machine("custommachinery:calling_altar", 400)
		.requireItem('kubejs:summon_blizz')
		.requireFluid(Fluid.of('astralsorcery:liquid_starlight', 5000))
		.runCommandOnEnd("/summon thermal:blizz ~ ~1 ~", false)
		.runCommandOnEnd("/fill ~ ~1 ~ ~ ~1 ~ minecraft:snow_block", false)
		;

	event.recipes.custommachinery.custom_machine("custommachinery:calling_altar", 400)
		.requireItem('kubejs:summon_blitz')
		.runCommandOnEnd("/summon thermal:blitz ~ ~1 ~", false);
	event.recipes.custommachinery.custom_machine("custommachinery:calling_altar", 400)
		.requireItem('kubejs:summon_basalz')
		.requireFluid(Fluid.of('tconstruct:molten_obsidian', 5000))
		.runCommandOnEnd("/summon thermal:basalz ~ ~1 ~", false);



	//自动聚星缸
	event.recipes.custommachinery.custom_machine("custommachinery:auto_star_machine", 300)
		.requireItem('astralsorcery:aquamarine', "input2")
		.produceFluid(Fluid.of('astralsorcery:liquid_starlight', 2333));
	event.recipes.custommachinery.custom_machine("custommachinery:auto_star_machine", 300)
		.requireItem('astralsorcery:rock_crystal', "input2")
		.produceFluid(Fluid.of('astralsorcery:liquid_starlight', 2333));
	event.recipes.custommachinery.custom_machine("custommachinery:auto_star_machine", 360)
		.requireItem('kubejs:polluted_dirt', "input2")
		.produceFluid(Fluid.of('minecraft:lava', 2000));
	event.recipes.custommachinery.custom_machine("custommachinery:auto_star_machine", 240)
		.requireItem('quark:black_crystal', "input2")
		.produceFluid(Fluid.of('pneumaticcraft:oil', 2000));
	event.recipes.custommachinery.custom_machine("custommachinery:auto_star_machine", 200)
		.requireItem('minecraft:ice', "input2")
		.produceFluid(Fluid.of('minecraft:water', 2000));
	event.recipes.custommachinery.custom_machine("custommachinery:auto_star_machine", 200)
		.requireItem('astralsorcery:black_marble_raw', "input2")
		.produceItem('evilcraft:dark_block');
	event.recipes.custommachinery.custom_machine("custommachinery:auto_star_machine", 200)
		.requireItem('create:basin', "input2")
		.produceItem('astralsorcery:well')
	event.recipes.custommachinery.custom_machine("custommachinery:auto_star_machine", 200)
		.requireItem('mekanism:basic_fluid_tank', "input2")
		.produceItem('astralsorcery:chalice')
	// event.recipes.custommachinery.custom_machine("custommachinery:auto_star_machine", 200)
	// 	.requireItem('botania:pixie_dust', "input2")
	// 	.produceFluid(Fluid.of('manaliquidizer:mana_fluid', 2000));


	const auto_star_fluid = [
		{
			input: 'minecraft:fire_charge',
			output: Fluid.of('kubejs:blazing_pyrotheum', 1000) //烈焰
		},
		{
			input: 'thermal:lightning_charge',
			output: Fluid.of('kubejs:zephyrean_aerotheum', 1000) //空气
		},
		{
			input: 'thermal:earth_charge',
			output: Fluid.of('kubejs:tectonic_petrotheum', 1000) //裂岩
		},
		{
			input: 'thermal:ice_charge',
			output: Fluid.of('kubejs:gelid_cryotheum', 1000) //极寒
		}
	]
	auto_star_fluid.forEach((i) => {
		event.recipes.custommachinery.custom_machine("custommachinery:auto_star_machine", 40)
			.requireItem(i.input, "input2")
			.produceFluid(i.output);
	})


	//合金
	const allfur = [
		{
			input1: '4x evilcraft:vengeance_essence',
			input2: 'astralsorcery:resonating_gem',
			output: 'forbidden_arcanus:dark_matter'
		},
		{
			input1: '4x projectred-core:conductive_plate',
			input2: '2x projectred-core:blue_illumar',
			output: '16x projectred-core:electrotine_dust'

		},
		{
			output: '24x astralsorcery:marble_raw',
			input1: '4x kubejs:coarse_crystal_ingot',
			input2: '2x kubejs:polluted_dirt'
		},
		{
			output: 'projectred-core:electrotine_iron_comp',
			input1: 'kubejs:aquamarine_ingot',
			input2: '4x projectred-core:electrotine_dust'
		},
		{
			output: 'tconstruct:blazing_blood_bucket',
			input1: 'minecraft:bucket',
			input2: '2x minecraft:blaze_rod'
		}
	]
	allfur.forEach((i) => {
		event.recipes.custommachinery.custom_machine("custommachinery:alloying_furnace", 200)
			.requireItem(i.input1, "input1")
			.requireItem(i.input2, "input2")
			.requireFluid(Fluid.of("minecraft:lava", 200))
			.produceItem(i.output)
	});

	event.recipes.custommachinery.custom_machine("custommachinery:alloying_furnace", 200)
		.requireItemTag('#forge:ingots/copper', 1, "input1")
		.requireItemTag('#forge:ingots/nickel', 1, "input2")
		.requireFluid(Fluid.of("minecraft:lava", 200))
		.produceItem('2x emendatusenigmatica:constantan_ingot')
	event.recipes.custommachinery.custom_machine("custommachinery:alloying_furnace", 200)
		.requireItemTag('#forge:ingots/iron', 2, "input1")
		.requireItemTag('#forge:ingots/nickel', 1, "input2")
		.requireFluid(Fluid.of("minecraft:lava", 200))
		.produceItem('3x emendatusenigmatica:invar_ingot')
	event.recipes.custommachinery.custom_machine("custommachinery:alloying_furnace", 200)
		.requireItemTag('#forge:ingots/iron', 2, "input1")
		.requireItemTag('#forge:ingots/nickel', 1, "input2")
		.requireFluid(Fluid.of("minecraft:lava", 200))
		.produceItem('3x emendatusenigmatica:invar_ingot')
	event.recipes.custommachinery.custom_machine("custommachinery:alloying_furnace", 200)
		.requireItemTag('#forge:ingots/copper', 1, "input1")
		.requireItemTag('#forge:ingots/zinc', 1, "input2")
		.requireFluid(Fluid.of("minecraft:lava", 200))
		.produceItem('2x emendatusenigmatica:brass_ingot')
	event.recipes.custommachinery.custom_machine("custommachinery:alloying_furnace", 200)
		.requireItemTag('#forge:ingots/copper', 3, "input1")
		.requireItemTag('#forge:ingots/tin', 1, "input2")
		.requireFluid(Fluid.of("minecraft:lava", 200))
		.produceItem('4x emendatusenigmatica:bronze_ingot')
	event.recipes.custommachinery.custom_machine("custommachinery:alloying_furnace", 200)
		.requireItem('3x astralsorcery:aquamarine', "input1")
		.requireItem('2x tconstruct:seared_brick', "input2")
		.requireFluid(Fluid.of("minecraft:lava", 200))
		.produceItem('2x kubejs:aquamarine_ingot')
	event.recipes.custommachinery.custom_machine("custommachinery:alloying_furnace", 200)
		.requireItem('emendatusenigmatica:diamond_gear', "input1")
		.requireItem('evilcraft:vengeance_essence', "input2")
		.requireFluid(Fluid.of("minecraft:lava", 200))
		.produceItem('quark:diamond_heart')
	event.recipes.custommachinery.custom_machine("custommachinery:alloying_furnace", 200)
		.requireItem('20x minecraft:diamond', "input1")
		.requireItem('kubejs:coarse_block', "input2")
		.requireFluid(Fluid.of("minecraft:lava", 200))
		.produceItem('quark:blue_crystal')
	event.recipes.custommachinery.custom_machine("custommachinery:alloying_furnace", 200)
		.requireItem('20x minecraft:emerald', "input1")
		.requireItem('kubejs:coarse_block', "input2")
		.requireFluid(Fluid.of("minecraft:lava", 200))
		.produceItem('quark:green_crystal')
	event.recipes.custommachinery.custom_machine("custommachinery:alloying_furnace", 200)
		.requireItem('20x minecraft:lapis_lazuli', "input1")
		.requireItem('kubejs:coarse_block', "input2")
		.requireFluid(Fluid.of("minecraft:lava", 200))
		.produceItem('quark:indigo_crystal')

	event.recipes.custommachinery.custom_machine("custommachinery:alloying_furnace", 200)
		.requireItemTag('#forge:ingots/gold', 1, "input1")
		.requireItemTag('#forge:ingots/silver', 1, "input2")
		.requireFluid(Fluid.of("minecraft:lava", 200))
		.produceItem('2x emendatusenigmatica:electrum_ingot')



	const recipesff = [
		{
			input: 'quark:blue_crystal',
			output: 'emendatusenigmatica:diamond_chunk'
		},
		{
			input: 'quark:indigo_crystal',
			output: 'emendatusenigmatica:lapis_chunk'
		},
		{
			input: 'quark:green_crystal',
			output: 'emendatusenigmatica:emerald_chunk'
		},
		{
			input: 'quark:black_crystal',
			output: 'emendatusenigmatica:coal_chunk'
		},
		{
			input: 'quark:orange_crystal',
			output: 'emendatusenigmatica:copper_chunk'
		},
		{
			input: 'quark:white_crystal',
			output: 'emendatusenigmatica:iron_chunk'
		},
		{
			input: 'quark:red_crystal',
			output: 'emendatusenigmatica:redstone_chunk'
		},
		{
			input: 'quark:yellow_crystal',
			output: 'minecraft:glowstone'
		},
		{
			input: 'quark:violet_crystal',
			output: 'draconicevolution:draconium_dust'
		}

	];
	recipesff.forEach((recipe) => {
		event.recipes.custommachinery.custom_machine("custommachinery:flame_furnace", 200)
			.requireItem(recipe.input)
			.requireFluidTag("#minecraft:lava", 100)
			.produceItem(recipe.output)
	});

	event.recipes.custommachinery.custom_machine("custommachinery:flame_furnace", 200)
		.requireItem('astralsorcery:aquamarine')
		.requireFluid(Fluid.of('astralsorcery:liquid_starlight', 8000))
		.produceItem('astralsorcery:resonating_gem')

	event.recipes.custommachinery.custom_machine("custommachinery:flame_furnace", 200)
		.requireItem('elementalcraft:burnt_glass')
		.requireFluid(Fluid.of('astralsorcery:liquid_starlight', 200))
		.produceItem('astralsorcery:glass_lens')




	//复制机
	event.recipes.custommachinery.custom_machine("custommachinery:duplicator", 2000)
		.requireFluid(Fluid.of('manaliquidizer:mana_fluid', 33333))
		.requireItem("refinedstorage:basic_processor", "input3")
		.requireItem("refinedstorage:improved_processor", "input4")
		.requireItem("refinedstorage:advanced_processor", "input5")
		.requireItem("extrastorage:neural_processor", "input6")
		.requireFunctionToStart(ctx => {
			var machine = ctx.machine;
			var item = machine.getItemStored("input20");
			if (!item.isEmpty()) {
				return Result.success()
			}
			return Result.error("哎嘿");
		})
		.requireFunctionOnEnd(ctx => {
			var machine = ctx.machine;
			var item = machine.getItemStored("input20");
			if (!item.isEmpty()) {
				let itemname = item.getItem()
				machine.removeItemFromSlot("input20", 1, false);

				machine.addItemToSlot("output1", itemname, false);
				machine.addItemToSlot("output2", itemname, false);
			}

			return Result.success()
		})


	event.recipes.custommachinery.custom_machine("custommachinery:duplicator", 2000)
		.requireFluid(Fluid.of('kubejs:uu_substance', 5000))
		.requireItem("refinedstorage:basic_processor", "input3")
		.requireItem("refinedstorage:improved_processor", "input4")
		.requireItem("refinedstorage:advanced_processor", "input5")
		.requireItem("extrastorage:neural_processor", "input6")
		.requireFunctionToStart(ctx => {
			var machine = ctx.machine;
			var item = machine.getItemStored("input20");
			if (!item.isEmpty()) {
				return Result.success()
			}
			return Result.error("哎嘿");
		})
		.requireFunctionOnEnd(ctx => {
			var machine = ctx.machine;
			var item = machine.getItemStored("input20");
			if (!item.isEmpty()) {
				let itemname = item.getItem()
				machine.removeItemFromSlot("input20", 1, false);

				machine.addItemToSlot("output1", itemname, false);
				machine.addItemToSlot("output2", itemname, false);
			}

			return Result.success()
		})







});